﻿var div_1 = document.getElementById('one');
//-348

var timer = null;
function cd(speed, end) {
    clearInterval(timer);
    timer = setInterval(function () {
        if (div_1.offsetLeft == end) {
            clearInterval(timer);
        }
        else {
            div_1.style.left = div_1.offsetLeft + speed + 'px';
        }
    }, 5)
}
function sh(speed, end) {
    clearInterval(timer);
    timer = setInterval(function () {
        if (div_1.offsetLeft == end) {
            clearInterval(timer);
        }
        else {

            div_1.style.left = div_1.offsetLeft + speed + 'px';
        }
    }, 5)
}

